$:.push('gen-rb')

require 'thrift'

require 'service__demo'

class Service_Demo_Handle
  def initialize()

  end


  def aa
    return "1222"
  end
end


handle = Service_Demo_Handle.new
processor = Service_Demo::Processor.new(handle)


#transport = Thrift::BufferedTransport.new(Thrift::Socket.new('127.0.0.1', 8092))


transport = Thrift::ServerSocket.new(9090)
#transportFactory = Thrift::BufferedTransportFactory.new()
transportFactory = Thrift::FramedTransportFactory.new()
server = Thrift::NonblockingServer.new(processor, transport, transportFactory)


puts "Starting the QService server..."
server.serve()
puts "Done"


